from sys import argv

script, readfilename, writefilename = argv

readfile = open (readfilename)
writefile = open (writefilename, 'w')

#Get to the third line
line = readfile.readline()
writefile.write(line)
line = readfile.readline()
writefile.write(line)
line = readfile.readline()
writefile.write("21\n")

line = readfile.readline()
numbers = line.split()

writeline = ""
numCount = 1

for w in numbers:
	if (numCount % 3 == 2):
		writeline = writeline + " " + ("%i" % (int(w) + 1) )
	elif (numCount % 3 == 1):
		writeline = writeline + "\t" + w
	else:
		writeline = writeline + " " + w
	numCount = numCount + 1
writeline = writeline + "\n"

writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)
writefile.write(writeline)

print "totalNum: ", (numCount / 3)

readfile.close()
writefile.close()
